﻿/**
<code>
  <author name="Zealic" email="zealic(at)gmail.com" type="Creator"/>
</code>
**/
using System;


namespace Zealib.Transform
{
    public class EnumTransformer : ITransformer
    {
        public EnumTransformer(EnumTransformMode mode)
        {
            if (!Enum.IsDefined(typeof(EnumTransformMode), mode))
                throw new ArgumentException("Undefined mode.", "mode");
            Mode = mode;
        }

        public EnumTransformMode Mode
        {
            get;
            private set;
        }

        public bool CanTransformTo<TDestiation>()
        {
            return typeof(TDestiation).IsEnum;
        }

        public bool CanTransformBack<TSource>()
        {
            return typeof(TSource).IsEnum;
        }

        public TDestiation TransformTo<TDestiation>(object source)
        {
            throw new NotImplementedException();
        }

        public TSource TransformBack<TSource>(object destiation)
        {
            throw new NotImplementedException();
        }

    }
}
